package org.example.design.template;

abstract public class template {
    public final void process(){
        readData();
        processData();
        writeData();
    }
    protected abstract void readData(); // 读取数据
    protected abstract void processData(); // 处理数据

    protected void writeData() { // 写入数据
        System.out.println("Writing data to output.");
    }
}
